# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=linux-exploit-suggester.sh
pkgver=171.2063aeb
pkgrel=1
groups=('blackarch' 'blackarch-recon')
pkgdesc='Linux privilege escalation auditing tool.'
url='https://github.com/mzet-/linux-exploit-suggester'
arch=('any')
license=('GPL3')
depends=('bash' 'wget')
makedepends=('git')
source=("$pkgname::git+https://github.com/mzet-/linux-exploit-suggester.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 $pkgname "$pkgdir/usr/share/$pkgname/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

  ln -sf "/usr/share/$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

